package com.v2.k40;


import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class User implements InitializingBean, ApplicationContextAware {


	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("初始化属性赋值完后。。。");
	}

	@PostConstruct
	public void fun() {
		System.out.println("执行@PostConstruct修饰的方法。。。");
	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		System.out.println("执行aware，setApplicationContext方法。。。");
	}
}
